<template>
  <div>
		<Card>
			<div class="title">
				处理记录
			</div>
			<div class="section">
				<Input v-model="solution" type="textarea" :rows="4" placeholder="填写处理结果" style="width:60%;margin:20px"/>
				<Button type="warning" size="large" @click="submit()" style="margin:0 0 20px 20px;display:block">提交</Button>
			</div>
		</Card>
  </div>
</template>

<script>
export default {
  name: 'dispose',
  data () {
    return {
			solution: '',
			id: ''
    }
  },
  methods: {
		// 提交
		submit () {
			if (this.solution.trim() !== '') {
				this.$api.post(0, '/wl/v2/complaintFeedback', {complaintId: this.id, feedbackDescription: this.solution}, r => {
					if (r.data.code === 0) {
						this.$Message.success({
							content: '提交成功',
							onClose: function () {
                window.history.go(-1)
              }
						})
					}
				})
			} else {
				this.$Message.warning('不可发送空消息')
			}
		},
		confirm () {
		}
  },
  mounted () {
		this.id = this.$route.params.id
  }
}
</script>

<style>
	li{
		list-style: none;
	}
	span.label{
		color:#cccccc;
	}
	span.text{
		margin-right:40px
	}
	div.button{
		float:right;
		position:relative;
		top:-15px
	}
	span.status{
		color:#FF475A
	}
	div.title{
		background:#eeeeff;
		padding:15px 10px;
		border-top-left-radius: 5px;
		border-top-right-radius: 5px;
	}
	div.section{
		border:1px solid #ddd;
		border-bottom-left-radius:5px;
		border-bottom-right-radius:5px;
	}
	div.userInfor,div.personnel{
		padding:20px;
	}
	div.personnel,div.userInfor{
		border-top:1px solid #ddd
	}
	div.userInfor img,div.personnel img{
		height:40px;
		width:40px;
		border-radius:50%;
		float:left;
		margin-right:20px
	}
	div.infor{
		float:left
	}
	div.userInfor:after,div.personnel:after{
		content:'';
		display:block;
		clear:both
	}
</style>
